package 笔试强训;

import java.util.Scanner;

public class _0417T2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int x = scanner.nextInt();
        int[] nums = new int[n+1];
        for (int i = 1; i <= n; i++) {
            nums[i] = scanner.nextInt();
        }
        int left = 1;
        int right = 1;
        int sum = 0;
        int retLeft = -1-n;
        int retRight = -1;
        boolean flag = true;
        while(left<=right&&right<n) {
            if(flag) {
                sum+=nums[right];
            }
            if(sum<x) {
                right++;
                flag = true;
            }else {
                if(right-left<retRight-retLeft) {
                    retLeft = left;
                    retRight = right;
                    if(retRight-retLeft == 1) {
                        break;
                    }
                }
                sum-=nums[left];
                left++;
                flag = false;
            }
        }
        System.out.print(retLeft+" ");
        System.out.print(retRight);
    }
}
